<template>
	<view class="goods flex flex-ai-center ptb-8 pl-8">
		<w-image :src='order.goods_cover_image' radius="8" height="83" width="83" ></w-image>
		<view class="flex-1 pl-16 ptb-4 flex flex-dir-col flex-js-sb ptb-4" style="height: 166rpx;">
			<text class="font-color-main-text font-w-500">{{handleLang(order.goods_name)}}</text>
			<view class="font-color-999" v-if="order.goods_type!=1&&order.collection_code&&order.collection_code.length==1">
				<text class="font-size-10">{{handleLang('编号：')}}</text>
				<text class="font-size-10">#</text>
				<text class="font-size-14">{{code[0]}}</text>
				<text class="font-size-10">/{{code[1]}}</text>
			</view>
			<view>
				<u-line-progress inactiveColor='#DEE8FF' style="width: 100%;"
					:percentage="(order.sale_number/order.number)*100" activeColor="#f52500" :showText='false'
					height="8rpx"></u-line-progress>
				<view class="font-size-10 font-color-999 mt-4">
					{{handleLang('委托数量')}}：{{order.sale_number || 0}}/{{order.number}}
				</view>	
			</view>
		</view>
		<u-icon name="arrow-right" color="#fff"></u-icon>
	</view>
</template>  

<script>
	export default {
		props:{
			order:{
				type:Object,
				default(){
					return {
						product:{}
					}
				}
			}
		},
		computed:{
			code(){
				if(this.order.collection_code&&this.order.collection_code.length==1){
					return this.order.collection_code[0].split('/')
				} 
			},
		}
	}
</script>

<style>
</style>